import type { ComponentsConfig, ComponentsConfigRaw } from '../../types'
import { extendSchemas } from '@/components/cms/utils'
import advsConfig from './base/advs'
import { atlasMoreList } from './simples'

const basePath = 'template.atlasMore'
const config: ComponentsConfig = {
  default: 'atlasMoreList',
  components: extendSchemas<ComponentsConfigRaw>(
    {
      atlasMoreList: atlasMoreList({
        pageFields: {
          background: `${basePath}.background`
        },
        fields: {
          atlasGrid: {
            background: `${basePath}.content.alasGrid.background`,
            layout: {
              style: `${basePath}.content.alasGrid.layout.style`,
              limit: `${basePath}.content.alasGrid.layout.limit`
            }
          }
        }
      })
    },
    advsConfig(['playerBeforeAdv', 'playerPauseAdv'])
  )
}
export default config
